import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'

Vue.use(VueRouter)

const router = new VueRouter({
  mode:'history',
  routes,
// 切换路由时,恢复滚动条位置
  scrollBehavior() {
    return { x: 0, y: 0 }
  }
})

export default router